In the Bluetooth® low energy (BLE) link layer, the header in each data channel protocol data unit (PDU) includes a sequence number (SN) bit and a next expected sequence number (NESN) bit for controlling the sequencing of PDUs exchanged between two devices. The SN bit in a PDU is set by the sending device of the PDU to indicate the sequence number of the PDU being sent. The SN bit value is stored by the device to track the sequence number of the last PDU sent. The SN bit is initialized to 0 by the device upon entering the connection state. The SN bit is changed (from 0 to 1 or vice versa) for each new PDU sent by the device, but is not changed when a PDU is resent by the device.
The NESN is set to indicate the sequence number of the next expected PDU. The NESN is initialized to 0 by a device before receiving a PDU in the connection state. The NESN value is stored by the device to track the sequence number of the next expected PDU. The NESN is changed (from 0 to 1 or vice versa) upon receiving an expected PDU, i.e., when a PDU is received with a valid cyclic redundancy check (CRC) and with an SN equal to the NESN currently stored on the device, but remains unchanged upon failing to receive an expected PDU, i.e., when a PDU is received with an invalid CRC or with an SN that is not equal to the NESN currently stored on the device.
Data PDUs are transmitted by a sender and acknowledged by a receiver. If a data PDU is not positively acknowledged by the receiver, then the data PDU will be retransmitted by the sender until a positive acknowledgement is received. Retransmissions of a PDU may take relatively long time. BLE has a short preamble, and its access address and PDU are uncoded. The probability of PDU reception failure due to erred access address or CRC, for example, is approximately thirty percent. PDU reception failure may occur in either direction, which effectively doubles the PDU failure rate. Also, because the SN and NESN are each only one bit long, failure to receive two expected data or acknowledgement PDUs in a row may not be detected by the receiving device.
PDUs are retransmitted by the sender until a positive acknowledgement is received, which can lead to excessive retransmissions of time-sensitive data. This can result in the meaningless transmission of old data. When the recipient eventually receives these aged PDUs, it will unknowingly treat the PDUs as containing timely information.
Additionally, while waiting for a proper acknowledgement of previously sent PDUs, the excessive retransmission of the old PDUs holds up timely transmission of new PDUs. By the time the new PDUs are finally transmitted—after waiting for an old PDU to be acknowledged, for example—the new PDUs will be aged too. BLE is prone to packet reception failures, and hence excessive retransmissions of PDUs result in the reception of aged information and the delay of new data.
The current one-bit sequence number does not allow the sender to discard packets in the retransmission process. Discarding a PDU by the sender leads to another packet being discarded by the recipient—without the knowledge of both the sender and recipient. If encryption is enabled, discarding a PDU at the sender leads to invalid message integrity code (MIC) at the recipient, causing unnecessary loss of the connection and suspicion of security attacks. BLE's current reliance on a packet counter to do implicit counting of received PDUs also does not allow the sender to discard packets in the retransmission process as a result different packet counter values may be derived at the sender and the recipient.
The BLE system and the operation of the sequence number (SN), connection formation, and encryption is described in the “Specification of the Bluetooth System, Specification Volume 6, Core System Package [Low Energy Controller volume],” dated Jun. 30, 2010 and published by the Promoter Members of Bluetooth SIG, Inc., (“the Bluetooth Low Energy Controller specification”), the disclosure of which is hereby incorporated by reference herein in its entirety.